<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>



  <script>
    // 1.需要声明一个新的数组用于存放数据的变量newArr
    // 2.遍历原来的旧数组，找出大于等于10的元素
    // 3.一次追加给新的数组newArr
    let arr = [2, 0, 6, 1, 77, 0, 52, 0, 25, 7]
    let newArr = []
    for (let i = 0; i <= 10; i++) {
      if (arr[i] > 10) {
        // arr.push(arr[i])
        newArr.push(arr[i])
      }
    }
    console.log(newArr);
  </script>
</body>

</html>